<!doctype html>
<html
  lang="zh-CN"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:th="http://www.thymeleaf.org"
>
<body>
<!--左侧导航栏-->
<div
  th:fragment="side-navigation-bar"
  class="left"
>
  <script src="/static/js/lib/vuejs/vue.js"></script>
  <script src="/static/js/lib/rx-util/rx-util.js"></script>
  <script src="/static/js/common/general/BaseApi.js"></script>
  <script src="/static/js/module/system-config/model/SysMenu.js"></script>
  <script src="/static/js/module/system-config/api/sysMenuApi.js"></script>
  <script
    type="text/x-template"
    id="item-template"
    v-cloak
  >
    <li>
      <!--渲染当前节点-->
      <a
        v-if="item.parentId && isFolder"
        @click="toggle"
        href="#"
        class="level"
      >
        <span>{{item.label}}</span>
        <i :class="`jt ${isOpen ? 'nav_on' : ''}`"></i>
      </a>
      <a
        v-if="item.parentId && !isFolder"
        @click="view"
        href="#"
        :class="`level2 ${isOpen ? 'active' : ''}`"
      >
        <span>{{item.label}}</span>
      </a>

      <!--如果当前节点是文件夹并且不为空，则渲染子菜单-->
      <ul
        v-show="isOpen || !item.parentId"
        v-if="isFolder"
      >
        <tree-item
          class="item"
          v-for="(children) in item.child"
          :key="children.id"
          :item="children"
        ></tree-item>
      </ul>
    </li>
  </script>
  <ul id="menu-tree">
    <tree-item
      :item="item"
    ></tree-item>
  </ul>
  <script src="/static/js/common/business/initSysRealmTree.js"></script>
</div>
</body>
</html>